laravel createmany example

63

laravel createmany example -

$post = Post::find(1);

$post->comments()->createMany([
    ['message' => 'A new comment.'],
    ['message' => 'Another new comment.'],
]);

Comments

Submit
0 Comments